package com.imooc.schedule.raw;

import org.apache.shardingsphere.elasticjob.api.ShardingContext;
import org.apache.shardingsphere.elasticjob.simple.job.SimpleJob;

/**
 * @Author Tim
 * @Description:
 * @Version 1.0
 */
public class ProcessUserJob implements SimpleJob {
    @Override
    public void execute(ShardingContext shardingContext) {
        int shardingTotalCount = shardingContext.getShardingTotalCount();
        int shardingItem = shardingContext.getShardingItem();
        String shardingParameter = shardingContext.getShardingParameter();
        System.out.println(String.format("shardingTotalCount: %s, shardingItem: %s," +
                " shardingParameter: %s, Thread:%s", shardingTotalCount, shardingItem, shardingParameter, Thread.currentThread().getId()));
    }
}
